<?php

class Istituto extends AppModel {

    var $useTable = 'istituto'; // nome della tabella
	var $hasAndBelongsToMany = 'ClasseConcorso';
	


	public function beforeSave($options = array()){
    foreach (array_keys($this->hasAndBelongsToMany) as $model){
      if(isset($this->data[$this->name][$model])){
        $this->data[$model][$model] = $this->data[$this->name][$model];
        unset($this->data[$this->name][$model]);
	      }
	    }
	    return true;
	}
	

}

?>